package Lono::Recipe::Builder::Socialtext;

use strict;
use warnings;

use base qw( Socialtext::WikiObject );

sub load {
    my $builder = Lono::Recipe::Builder->new;
    $builder->set_name( $self->{'name'} );
    $builder->set_description( $self->{'description'} );
    $builder->set_preparation( $self->{'preparation'} );
    
    my @ingredients = @{$self->{'ingredients'}};
    foreach my $ing (@ingredients) {
        $builder->add_ingredient( $ing );
    }

    my $recipe = $builder->build_recipe;
    
    return $recipe;
}

1;
